package com.property.manage.dao.flowingWater;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.property.manage.model.flowingWater.ArrearsDetailEntity;
import com.property.manage.model.flowingWater.ArrearsOwnVo;
import com.property.manage.model.flowingWater.ArrearsVo;
import com.property.manage.model.flowingWater.TotalVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lwb
 **/
@Repository
public interface ArrearsDetailMapper extends BaseMapper<ArrearsDetailEntity> {
    /**
     * 欠款分页信息
     *
     * @param page       分页信息
     * @param villageId  小区编号
     * @param building   楼栋编号
     * @param unit       单元编号
     * @param roomNumber 房间号
     * @return 欠款信息
     */
    IPage<ArrearsVo> page(@Param("page") Page<ArrearsVo> page, @Param("villageId") Integer villageId,
                          @Param("building") Integer building, @Param("unit") Integer unit, @Param("roomNumber") String roomNumber);


    TotalVo getCount(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("ids") List<Integer> ids);

    /**
     * 欠款信息
     *
     * @param villageId  小区编号
     * @param building   楼栋编号
     * @param unit       单元编号
     * @param roomNumber 房间号
     * @return 欠款信息
     */
    List<ArrearsVo> list(@Param("villageId") Integer villageId,
                         @Param("building") Integer building, @Param("unit") Integer unit, @Param("roomNumber") String roomNumber);

    List<ArrearsOwnVo> listState();


    Integer arrearsCount(@Param("villageId") Integer villageId);
}
